<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="bayiSearch" styleClass="edit">

        <rich:simpleTogglePanel label="Bayi Search Filter" switchType="ajax">

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Unvan</ui:define>
                <h:inputText id="unvan" value="#{bayiList.bayi.unvan}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Bayi kodu</ui:define>
                <h:inputText id="bayiKodu" value="#{bayiList.bayi.bayiKodu}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Musterideki kodu</ui:define>
                <h:inputText id="musteridekiKodu" value="#{bayiList.bayi.musteridekiKodu}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Bina adi</ui:define>
                <h:inputText id="binaAdi" value="#{bayiList.bayi.binaAdi}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Bina no</ui:define>
                <h:inputText id="binaNo" value="#{bayiList.bayi.binaNo}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Cadde</ui:define>
                <h:inputText id="cadde" value="#{bayiList.bayi.cadde}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Daire no</ui:define>
                <h:inputText id="daireNo" value="#{bayiList.bayi.daireNo}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Kat no</ui:define>
                <h:inputText id="katNo" value="#{bayiList.bayi.katNo}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Posta kodu</ui:define>
                <h:inputText id="postaKodu" value="#{bayiList.bayi.postaKodu}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Sokak</ui:define>
                <h:inputText id="sokak" value="#{bayiList.bayi.sokak}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Ticari unvan</ui:define>
                <h:inputText id="ticariUnvan" value="#{bayiList.bayi.ticariUnvan}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Ilce eski adi</ui:define>
                <h:inputText id="ilceEskiAdi" value="#{bayiList.bayi.ilceEskiAdi}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Semt adi eski</ui:define>
                <h:inputText id="semtAdiEski" value="#{bayiList.bayi.semtAdiEski}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Adres eski</ui:define>
                <h:inputText id="adresEski" value="#{bayiList.bayi.adresEski}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Bayi tipi eski</ui:define>
                <h:inputText id="bayiTipiEski" value="#{bayiList.bayi.bayiTipiEski}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Kullanici kodu eski</ui:define>
                <h:inputText id="kullaniciKoduEski" value="#{bayiList.bayi.kullaniciKoduEski}"/>
            </s:decorate>

            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Match</ui:define>
                <h:selectOneRadio id="logic" value="#{bayiList.restrictionLogicOperator}" styleClass="radio">
                    <f:selectItem itemLabel="All" itemValue="and"/>
                    <f:selectItem itemLabel="Any" itemValue="or"/>
                </h:selectOneRadio>
            </s:decorate>

        </rich:simpleTogglePanel>

        <div class="actionButtons">
            <h:commandButton id="search" value="Search" action="/BayiList.xhtml"/>
            <s:button id="reset" value="Reset" includePageParams="false"/>
        </div>

    </h:form>

    <rich:panel>
        <f:facet name="header">Bayi Search Results (#{empty bayiList.resultList ? 0 : (bayiList.paginated ? bayiList.resultCount : bayiList.resultList.size)})</f:facet>
    <div class="results" id="bayiList">

    <h:outputText value="The bayi search returned no results."
               rendered="#{empty bayiList.resultList}"/>

    <rich:dataTable id="bayiList"
                var="_bayi"
              value="#{bayiList.resultList}"
           rendered="#{not empty bayiList.resultList}">
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Id"/>
                    <ui:param name="propertyPath" value="bayi.id"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.id}">
                <f:convertNumber/>
            </h:outputText>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Ilce id"/>
                    <ui:param name="propertyPath" value="bayi.ilce.id"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.ilce.id}">
                <f:convertNumber/>
            </h:outputText>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Semtler id"/>
                    <ui:param name="propertyPath" value="bayi.semtler.id"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.semtler.id}">
                <f:convertNumber/>
            </h:outputText>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Iller id"/>
                    <ui:param name="propertyPath" value="bayi.iller.id"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.iller.id}">
                <f:convertNumber/>
            </h:outputText>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Unvan"/>
                    <ui:param name="propertyPath" value="bayi.unvan"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.unvan}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Bayi kodu"/>
                    <ui:param name="propertyPath" value="bayi.bayiKodu"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.bayiKodu}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Musterideki kodu"/>
                    <ui:param name="propertyPath" value="bayi.musteridekiKodu"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.musteridekiKodu}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Bina adi"/>
                    <ui:param name="propertyPath" value="bayi.binaAdi"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.binaAdi}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Bina no"/>
                    <ui:param name="propertyPath" value="bayi.binaNo"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.binaNo}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Cadde"/>
                    <ui:param name="propertyPath" value="bayi.cadde"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.cadde}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Daire no"/>
                    <ui:param name="propertyPath" value="bayi.daireNo"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.daireNo}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Iptal"/>
                    <ui:param name="propertyPath" value="bayi.iptal"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.iptal}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Kat no"/>
                    <ui:param name="propertyPath" value="bayi.katNo"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.katNo}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Posta kodu"/>
                    <ui:param name="propertyPath" value="bayi.postaKodu"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.postaKodu}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Sokak"/>
                    <ui:param name="propertyPath" value="bayi.sokak"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.sokak}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Ticari unvan"/>
                    <ui:param name="propertyPath" value="bayi.ticariUnvan"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.ticariUnvan}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Ilce eski adi"/>
                    <ui:param name="propertyPath" value="bayi.ilceEskiAdi"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.ilceEskiAdi}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Semt adi eski"/>
                    <ui:param name="propertyPath" value="bayi.semtAdiEski"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.semtAdiEski}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Adres eski"/>
                    <ui:param name="propertyPath" value="bayi.adresEski"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.adresEski}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Bayi tipi eski"/>
                    <ui:param name="propertyPath" value="bayi.bayiTipiEski"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.bayiTipiEski}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{bayiList}"/>
                    <ui:param name="propertyLabel" value="Kullanici kodu eski"/>
                    <ui:param name="propertyPath" value="bayi.kullaniciKoduEski"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_bayi.kullaniciKoduEski}"/>
        </h:column>
        <rich:column styleClass="action">
            <f:facet name="header">Action</f:facet>
            <s:link view="/#{empty from ? 'Bayi' : from}.xhtml"
                   value="#{empty from ? 'View' : 'Select'}"
             propagation="#{empty from ? 'none' : 'default'}"
                      id="bayiViewId">
                <f:param name="bayiId"
                        value="#{_bayi.id}"/>
            </s:link>
            #{' '}
            <s:link view="/BayiEdit.xhtml"
                   value="Edit"
             propagation="none"
                      id="bayiEdit"
                rendered="#{empty from}">
                <f:param name="bayiId"
                        value="#{_bayi.id}"/>
            </s:link>
        </rich:column>
    </rich:dataTable>

    </div>
    </rich:panel>

    <div class="tableControl">

        <s:link view="/BayiList.xhtml"
            rendered="#{bayiList.previousExists}"
               value="#{messages.left}#{messages.left} First Page"
                  id="firstPage">
          <f:param name="firstResult" value="0"/>
        </s:link>

        <s:link view="/BayiList.xhtml"
            rendered="#{bayiList.previousExists}"
               value="#{messages.left} Previous Page"
                  id="previousPage">
            <f:param name="firstResult"
                    value="#{bayiList.previousFirstResult}"/>
        </s:link>

        <s:link view="/BayiList.xhtml"
            rendered="#{bayiList.nextExists}"
               value="Next Page #{messages.right}"
                  id="nextPage">
            <f:param name="firstResult"
                    value="#{bayiList.nextFirstResult}"/>
        </s:link>

        <s:link view="/BayiList.xhtml"
            rendered="#{bayiList.nextExists}"
               value="Last Page #{messages.right}#{messages.right}"
                  id="lastPage">
            <f:param name="firstResult"
                    value="#{bayiList.lastFirstResult}"/>
        </s:link>

    </div>

    <s:div styleClass="actionButtons" rendered="#{empty from}">
        <s:button view="/BayiEdit.xhtml"
                    id="create"
           propagation="none"
                 value="Create bayi">
            <f:param name="bayiId"/>
        </s:button>
    </s:div>

</ui:define>

</ui:composition>
